package pl.perseus.service.student;

import java.util.List;

import lombok.Data;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import pl.perseus.dao.IStudentDao;
import pl.perseus.model.Classes;
import pl.perseus.model.Student;

@Data
@Service
@Transactional
public class StudentService implements IStudentService{

	@Autowired
	private IStudentDao studentDao;
	
	@Override
	public Student insertStudent(Student s) {
		return studentDao.insertStudent(s);
	}
	
	@Override
	public Student selectByIdStudent(Long id){
		return studentDao.selectByIdStudent(id);
	}
	
	@Override
	public List<Student> getAllStudents(){
		return studentDao.getAllStudents();
	}

	@Override
	public List<Student> getStudentsInClasses(Classes classes) {
		return studentDao.getStudentsInClasses(classes);
	}

}
